//
//  CityTourIntroduceCell.m
//  ImGuider
//
//  Created by 王鹏宇 on 2017/6/19.
//  Copyright © 2017年 imguider. All rights reserved.
//

#import "CityTourIntroduceCell.h"

@implementation CityTourIntroduceCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    [IGUtils viewShowShadow:self.contentView shadowRadius:5 shadowOpacity:0.5 WithColor:[UIColor blackColor]];
    
    self.tagViewWidth.constant = 0;
    self.tagView.tagViewWidth = self.tagViewWidth;
}

-(void)setFrame:(CGRect)frame
{
    frame.origin.x = 15;//这里间距为10，可以根据自己的情况调整
    frame.size.width -= 2 * frame.origin.x;
    frame.size.height -= frame.origin.x;
    [super setFrame:frame];
}

- (IBAction)guiderBtnClicked:(id)sender {
}

- (void)configDataWintLineModel:(LineModel *)model {
    
    
    [self.lineImageView setImageURL:[NSURL URLWithString:model.pictureArray.firstObject] placeholderImage:[UIImage imageNamed:@"placeholder_squ"]];
    self.guiderIconView.headerImageName  = model.guide.headimg;
    self.guiderIconView.vip = model.guide.vip;
    
    self.guiderNameLabel.text = model.guide.realname;
    self.lineNameLabel.text = model.linename;
    self.timeLabel.text = model.recordcount;
    self.visitLabel.text = model.visits;
    self.timeLabel.text = [NSString stringWithFormat:@"%@min",model.timelabel];
    
    if (model.tagArray.count > 0) {
        self.tagView.tagsArray = model.tagArray;
    }
    
    
    IGLog(@"%f",model.score.floatValue);
    
    [self.starView setScore:model.score.floatValue/10];
    switch (model.transport.integerValue) {
        case 1:
            self.transportImageView.image = [UIImage  imageNamed:@"urbanline_foot"];
            break;
        case 2:
            self.transportImageView.image = [UIImage  imageNamed:@"urbanline_bus"];
            break;
        case 3:
            self.transportImageView.image = [UIImage  imageNamed:@"urbanline_ship"];
            break;
        case 4:
            self.transportImageView.image = [UIImage  imageNamed:@"urbanline_car"];
            break;
            
        default:
            self.transportImageView.image = [UIImage  imageNamed:@"urbanline_foot"];
            break;
    }
    
}

@end
